/**
 * Project Name:sc-parent-mapper
 * File Name:YuyueTest_H.java
 * Package Name:com.sc.mapper
 * Date:2018年6月30日下午3:43:09
 * Copyright (c) 2018, bluemobi All Rights Reserved.
 */

package com.sc.mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;

import com.sc.mapper.mapperhand.HandappointmentMapper;
import com.sc.mapper.mapperhand.HandcustomerMapper;
import com.sc.pojo.Appointment;
import com.sc.pojo.BuyHoueSave;
import com.sc.pojo.Customer;
import com.sc.pojo.Designtype;
import com.sc.pojo.Employee;
import com.sc.pojo.House;
import com.sc.pojo.Items;

/**
 * Description:   <br/>
 * Date:     2018年6月30日 下午3:43:09 <br/>
 * @author   huanglei
 * @version
 * @see
 */
@SpringBootTest
public class YuyueTest_H {

    @Test
    public void Demo1() {
        System.out.println("预约申请");
        SqlSession session = MyBatisUntil.getSqlSession();
        HandappointmentMapper appointmentMapper = session.getMapper(HandappointmentMapper.class);
        Map<String, Object> map=new HashMap<String, Object>();
        map.put("wxname", "微信名");
        map.put("wxphone", "15087322841");
        map.put("yname", "大大");
        map.put("wxhid", 2);
        map.put("wxgender", "女");
        appointmentMapper.insertAppointment(map);
       
    }
    @Test
    public void Demo2(){
        System.out.println("查询此人是否存在于预约申请表中");
        SqlSession session = MyBatisUntil.getSqlSession();
        HandappointmentMapper appointmentMapper = session.getMapper(HandappointmentMapper.class);
        Appointment app=new Appointment();
        app.setAphone("15071255813");
        List<Appointment> list=appointmentMapper.selectByphone(app);
        System.out.println("查询结果为："+list.size());
    }
    @Test
    public void Demo3(){
        System.out.println("查询此人是否存在于客户表中");
        SqlSession session = MyBatisUntil.getSqlSession();
        HandcustomerMapper customerMapper = session.getMapper(HandcustomerMapper.class);
        Customer customer=new Customer();
        customer.setCphone("15071255813");
        List<Customer> list=customerMapper.selecustomerByphone(customer);
        System.out.println("查询结果为："+list.size());
    }
   
    
   
}

